$(document).ready(function(){
    $(".booklist-btn button").click(function(event){
        var btns=$(".booklist-btn button ");
        if (event.target.classList.contains("btn-info")) {
            return;
        }
        btns.removeClass("btn-info");
        btns.addClass("btn-default");
        event.target.classList.add("btn-info");
    })
    document.getElementById("dropBox").ondragenter=function (e) {
        e.stopPropagation();
        e.preventDefault();
        console.log("aaaaaaaaaa")
    }
    document.getElementById("dropBox").ondragover=function (e) {
        e.stopPropagation();
        e.preventDefault();
    }
    document.getElementById("dropBox").ondrop=function (e) {
        e.stopPropagation();
        e.preventDefault();
        var data=e.dataTransfer;
        var fileList=data.files;
        var reader=new FileReader();
        reader.onloadend=function(e){
            var objectUrl=window.URL.createObjectURL(this.result);
        }
        for(var i=0;i<fileList.length;i++){
            var fileType=FileList[i].type;
            if(fileType.contains("image"))
                reader.readAsArrayBuffer(fileList[i])
            else
                continue;
        }

    }
});